<?php
session_start();
require_once("authimage-inc/class.captcha.php");

$objCaptcha = new Captcha;

$arrCaptcha['width'] = 200;
$arrCaptcha['height'] = 80;

//Noise
$arrNoise['type'] = 'BackgroundNoise'; //RandomNoise
$arrNoise['dir'] = 'authimage-inc/noises/';

//WordArt
$arrWordart['dir'] = 'authimage-inc/fonts/';
$arrWordart['capital'] = FALSE;
$arrWordart['color'] = '#000000';
$arrWordart['angle'] = 0;
$arrWordart['filter'] = 'Wavy';//Wavy
$arrWordart['typing'] = 'linear';

/*
$strImgVeriword = "";
$intVeriwordLength = 4;
srand((double)microtime()*1000000);
for($i = 0; $i < $intVeriwordLength; $i++) {
	$Char = chr(rand(48, 90));
	while (!ereg("[A-Z0-9]", $Char)){
		$Char = chr(rand(48, 90));
	}
	$strImgVeriword .= $Char;
}
*/
$objCaptcha -> setConfiguration($arrCaptcha, "", $arrNoise, $arrWordart);
$objCaptcha -> word = $_SESSION["ImgVeriword"];
$im = $objCaptcha -> getCaptcha();

header("Content-type: image/jpeg");
imagejpeg($im);
?>